<script setup name="b01">
import {Splitpanes, Pane} from "splitpanes"
import "splitpanes/dist/splitpanes.css"
import useAppStore from "@/store/modules/app.js";


const appStore = useAppStore();
//表格工具栏
const query = ref("");
const queryUnit = () => {

}

const handleCommand = (type) => {

}

//表格
const tableData = ref([])

const select = () => {

}

const clickRow = () => {

}

const handleSelectionChange = () => {

}

const add = () => {

}
const del = () => {

}


/**
 * 表单
 */

const b01Form = ref({})
</script>

<template>
  <div class="app-container">
    <el-row :gutter="10">
      <splitpanes :horizontal="appStore.device === 'mobile'" class="default-theme">
        <pane size="30">
          <el-col>
            <el-card style="height: calc(100vh - 125px)">
              <div style="margin: 3px">
                <el-input
                    v-model="query"
                    style="width: 340px;margin: 0 3px 0 3px"
                    placeholder="请输入机构关键字"

                ></el-input>
                <el-button type="primary" @click="queryUnit"><i class="glyphicon glyphicon-search"></i>&nbsp;搜索
                </el-button>
                <el-row style="margin-top: 5px;margin-bottom: 5px;">
                  <el-button type="primary" @click="handleCommand('selectUnitTree')"><i
                      class="fa fa-download"></i>&nbsp;机构导出
                  </el-button>
                  <el-button type="success" @click="handleCommand('onSort')"><i
                      class="glyphicon glyphicon-list-alt"></i>&nbsp;机构排序
                  </el-button>
                  <el-button type="warning" @click="handleCommand('moveUnitMain')"><i
                      class="glyphicon glyphicon-random"></i>&nbsp;机构迁移
                  </el-button>
                </el-row>
              </div>
              <el-table
                  ref="TableTree"
                  :data="tableData"
                  style="width: 100%; margin-bottom: 20px"
                  :height="'100%'"
                  row-key="value"
                  :expand-row-keys="['-1']"
                  @select="select"
                  :tree-props="{children: 'children',checkStrictly: true}"
                  highlight-current-row
                  @row-click="clickRow"
                  @selection-change="handleSelectionChange"
              >
                <el-table-column prop="label" label="机构名称"
                                 :show-overflow-tooltip="true"></el-table-column>
                <el-table-column label="操作" min-width="40">
                  <template #default="scope">
                    <el-button link type="primary" size="small" @click="add(scope.row)">新增
                    </el-button>
                    <el-button link type="primary" size="small" @click="del(scope.row)">删除
                    </el-button>
                  </template>
                </el-table-column>
              </el-table>
            </el-card>
          </el-col>
        </pane>
        <pane size="70">
          <el-col>
            <el-card style="height: calc(100vh - 125px)">
              <el-form v-model="b01Form" label-suffix=":" label-width="180px">
                <el-row>
                  <el-col :span="24">
                    <el-form-item label="机构名称">
                      <el-input v-model="b01Form.b0101"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row>
                  <el-col :span="12">
                    <el-form-item label="机构简称">
                      <el-input v-model="b01Form.b0101"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="机构编码">
                      <el-input v-model="b01Form.b0101"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row>
                  <el-col :span="24">
                    <el-form-item label="机构分组">
                      <el-input v-model="b01Form.b0101"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row>
                  <el-col :span="12">
                    <el-form-item label="机构所在政区">
                      <el-input v-model="b01Form.b0101"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="机构隶属关系">
                      <el-input v-model="b01Form.b0101"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row>
                  <el-col :span="12">
                    <el-form-item label="机构类别">
                      <el-input v-model="b01Form.b0101"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="机构级别">
                      <el-input v-model="b01Form.b0101"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row>
                  <el-col :span="24">
                    <el-form-item label="领导职数">
                      <el-input v-model="b01Form.b0150"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row>
                  <el-col :span="12">
                    <el-form-item label="机构成立批准时间">
                      <el-input v-model="b01Form.b0164"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="机构成立批准文号">
                      <el-input v-model="b01Form.b0167"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row>
                  <el-col :span="12">
                    <el-form-item label="机构成立申请时间">
                      <el-input v-model="b01Form.b0268"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="机构成立申请文号">
                      <el-input v-model="b01Form.b0269"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row>
                  <el-col :span="12">
                    <el-form-item label="机构成立审批时间">
                      <el-input v-model="b01Form.b0238"></el-input>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="机构成立审批文号">
                      <el-input v-model="b01Form.b0239"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row>
                  <el-col :span="24">
                    <el-form-item label="备注">
                      <el-input type="textarea" v-model="b01Form.b0180"></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-form>
            </el-card>
          </el-col>
        </pane>
      </splitpanes>
    </el-row>
  </div>
</template>

<style scoped lang="scss">

</style>